package com.vftour.stu.sentinel.feign;

import com.vftour.stu.sentinel.model.User;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;

/**
 * UserClientFallbackFactory
 *
 * @version 1.0
 * @author: 东东 | d@tke.store
 * @date :  2022/3/6 12:04 上午
 */
@Slf4j
public class UserClientFallbackFactory implements FallbackFactory<UserClient> {
    @Override
    public UserClient create(Throwable throwable) {
        return new UserClient() {
            @Override
            public User getById(String id) {
                log.info("dddddd---------");
                return new User(id, "东东", 36);
            }
        };
    }
}
